<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
		<title>基本信息</title>
		<link rel="stylesheet" href="__AGENT__/css/iconfont.css" />
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">

					<div class="rigtop">
						<span class="title">帐号中心</span>
					</div>
					<div class="indrig_con" style="position: relative;">
						<div class="zizh_btnbox" style="top: -88px; right: 20px;">
							<button class="zizh_btn" type="button" onclick="show_agent()">修改商家信息</button>
						</div>
						<!--基本信息内容-->
						<div class="shxx_list">
							<div class="shxx_item">
								<div class="shxx_title">基本信息</div>
								<div class="shxx_jibbox clearfix">
									<div class="shxx_jbleft">
										<div class="shxx_row clearfix">
											<div class="left">帐户余额</div>
											<div class="right">
												<p><em>{$data.balance}元</em>
													<a href="javascript:;" onclick="yue_tixian()" class="edit">提现</a>
													<a href="{:url('index/yue_record')}" class="green">记录</a>												
												</p>
											</div>
										</div>
										<div class="shxx_row clearfix">
											<div class="left">鼓励金</div>
											<div class="right">
												<p><em>{$data.score}元</em>
													<a href="javascript:;" onclick="yue_score()" class="edit">充值</a>
													<a href="javascript:;" onclick="score_yue()" class="edit">兑现</a>
													<a href="{:url('index/score_record')}" class="green">记录</a>
												</p>
											</div>
										</div>
										{if $Think.config.open_sq==1}
										<div class="shxx_row clearfix">
											<div class="left">广告余额</div>
											<div class="right">
												<p><em>{$data.ad_money}元</em>
													<a href="javascript:;" onclick="yue_ad()" class="edit">充值</a>
													<a href="{:url('index/ad_record')}" class="green">记录</a>
												</p>
											</div>
										</div>
										{/if}
										<div class="shxx_row clearfix">
											<div class="left">店铺电话</div>
											<div class="right">
												<p><em>{$data.tel}</em>
												</p>
											</div>
										</div>
										<div class="shxx_row clearfix">
											<div class="left">店铺性质</div>
											<div class="right">
												<p><em>
													{switch name="$data.store_property"}
													    {case value="1"}个人{/case}
													    {case value="2"}企业{/case}
													    {default /}个体户
													{/switch}
												</em></p>
											</div>
										</div>
										<div class="shxx_row clearfix">
											<div class="left">商家地址</div>
											<div class="right">
												<p><em id="address">{$data.address}</em>
													<a href="javascript:;" onclick="show_map()" class="edit">修改</a>
												</p>
											</div>
										</div>
										<div class="shxx_row clearfix">
											<div class="left">推广码</div>
											<div class="right">
												<p><em id="address"><a class="iconfont icon-erweima"  href="javascript:;" onclick="tuiguang('{$data.id}')"></a></em>
												<em style="margin-left: 10px;">(提示:用于PC端收银)</em>
												</p>
											</div>
										</div>
										<div class="shxx_row clearfix">
											<div class="left">会员充值码</div>
											<div class="right">
												<p><em id="address"><a class="iconfont icon-erweima"  href="javascript:;" onclick="chongzhi('{$data.id}')"></a></em>
												<em style="margin-left: 10px;">(提示:专属用于本店会员充值)</em>
												</p>
											</div>
										</div>
									</div>
									<div class="shxx_jbright">
										<p class="shxx_xmimg">
											{if condition="$data.logo == null"}
											<img src="__OEM__/img/logomr.png"> {else /}
											<img src="{$data.logo}"> {/if}
										</p>
										<p class="shxx_xmnam">{$data.agent_name}</p>
										<p class="shxx_xminfo">{$data.agent_no}</p>
									</div>
								</div>
							</div>
							<div class="shxx_item">
								<div class="shxx_title">账号安全设置</div>
								<div class="shxx_row clearfix">
									<div class="left">登录密码</div>
									<div class="right">
										<p><em>用于登录时使用</em>
											<a href="javascript:;" onclick="return_password()" class="edit">重置</a>
										</p>
									</div>
								</div>
								<div class="shxx_row clearfix">
									<div class="left">操作密码</div>
									<div class="right">
										<p><em>用于重要操作时使用</em>
											<a href="javascript:;" onclick="return_operationpwd()" class="edit">重置</a>
										</p>
									</div>
								</div>
							</div>
							<div class="shxx_item">
								<div class="shxx_title">所属服务机构</div>
								<div class="shxx_row clearfix">
									<div class="left">{$data1.project_name}</div>
									<div class="right">
										<p><em>{$data1.mobile}</em></p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}
	</body>

</html>
<script type="text/javascript">
	function yue_tixian() {
		layer.open({
			type: 2,
			title: '余额提现',
			shadeClose: true,
			shade: 0.8,
			area: ['500px', '300px'],
			content: "{:url('index/yue_tixian')}"
		});
	}

	function show_map() {
		layer.open({
			type: 2,
			title: '修改地址',
			shadeClose: true,
			shade: 0.8,
			area: ['900px', '550px'],
			content: "{:url('index/edit_address')}"
		});
	}

	function return_password() {
		layer.open({
			type: 2,
			title: '重置登录密码',
			shadeClose: true,
			shade: 0.8,
			area: ['500px', '250px'],
			content: "{:url('index/return_password')}"
		});
	}

	function return_operationpwd() {
		layer.open({
			type: 2,
			title: '重置操作密码',
			shadeClose: true,
			shade: 0.8,
			area: ['500px', '250px'],
			content: "{:url('index/return_operationpwd')}"
		});
	}

	function score_yue() {
		layer.open({
			type: 2,
			title: '鼓励金兑换到余额',
			shadeClose: true,
			shade: 0.8,
			area: ['500px', '370px'],
			content: "{:url('index/score_yue')}"
		});
	}

	function yue_score() {
		layer.open({
			type: 2,
			title: '充值鼓励金',
			shadeClose: true,
			shade: 0.8,
			area: ['220px', '265px'],
			content: "{:url('index/yue_score')}"
		});
	}

	function yue_ad() {
		layer.open({
			type: 2,
			title: '充值广告费',
			shadeClose: true,
			shade: 0.8,
			area: ['255px', '285px'],
			content: "{:url('index/yue_ad')}"
		});
	}

	function show_agent() {
		layer.open({
			type: 2,
			title: '修改商家信息',
			shadeClose: true,
			shade: 0.8,
			area: ['770px', '750px'],
			content: "{:url('index/show_agent',['id'=>session('agent_id')])}"
		});
	}
	
	function show_city_pt(){
		layer.open({
			type: 2,
			title: '修改商家信息',
			shadeClose: true,
			shade: 0.8,
			area: ['460px', '260px'],
			content: "{:url('index/show_city_pt')}"
		});
	}
	
	
	function tuiguang(store_id) {
		var url = 'tuiguang?store_id='+store_id;
		layer.open({
		  type: 2,
		  title: '商家推广二维码',
		  shadeClose: true,
		  shade: 0.8,
		  area: ['426px', '688px'],
		  content: [url]
		}); 
	}
	
	function chongzhi(store_id) {
		var url = 'chongzhi?store_id='+store_id;
		layer.open({
		  type: 2,
		  title: '商家充值二维码',
		  shadeClose: true,
		  shade: 0.8,
		  area: ['426px', '688px'],
		  content: [url]
		}); 
	}
</script>